@import '~@styles/colors.less';

// antd conform 样式
.antdConform() {
  :global {
    .ant-modal-body {
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 30px 20px;
    }

    .ant-modal-confirm-body-wrapper {
      width: 100%;
    }

    .ant-modal-confirm-body {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;

      .anticon {
        display: none;
      }
    }
    .ant-modal-confirm-btns {
      display: flex;
      justify-content: center;
      width: 100%;

      .ant-btn {
        width: 35%;
        height: 35px;
      }
    }
    .ant-modal-confirm-content {
      text-align: center;
      margin-left: 0 !important;
    }
  }
}

.darkAntdConform() {
  :global {
    .ant-modal-content {
      background-color: @dark-bgc;
    }

    .ant-modal-confirm-title,
    .ant-modal-confirm-content {
      color: @dark-fc;
    }
  }
}

// ActionIcon样式
.changeIconWrap() {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  left: 0;
  bottom: 64px;
  width: 12px;
  height: 70px;
  border-top-left-radius: 0px;
  border-bottom-left-radius: 0px;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
  background-color: @sky-blue;
  box-shadow: 0 0 5px @fff;
  transition: all 0.3s ease-in-out;
  cursor: pointer;
  z-index: 10;

  .icon {
    color: @menu-active;
    font-size: 12px;
    transition: all 0.3s ease-in-out;
  }

  &:hover {
    width: 20px;
    transition: all 0.3s ease-in-out;

    .icon {
      font-size: 16px;
      transition: all 0.3s ease-in-out;
    }
  }
}

// 是网页整体变成灰色
.htmlToGray() {
  filter: grayscale(100%);
  -webkit-filter: grayscale(100%);
  -moz-filter: grayscale(100%);
  -ms-filter: grayscale(100%);
  -o-filter: grayscale(100%);
  filter: url('data:image/svg+xml;utf8,#grayscale');
  filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
  -webkit-filter: grayscale(1);
}

// 空状态样式
.emptyWrap() {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  background-color: @fff;
  border-radius: 5px;
}

// 双击不选中文字
.clickNoSelectText {
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -khtml-user-select: none;
  user-select: none;
}

.ellipsisMore(@count) {
  text-overflow: -o-ellipsis-lastline;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: @count;
  line-clamp: @count;
  -webkit-box-orient: vertical;
}

.ellipsis() {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.webkitScrollbarStyle(@bgc, @fc) {
  /*整个滚动条*/
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background-color: transparent;
  }

  /*定义滚动条轨道*/
  ::-webkit-scrollbar-track {
    height: 6px;
  }

  /*定义滑块*/
  ::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
  }
}
